import { createSSRApp } from 'vue'
import App from '@/App.vue'
import Tool from '@/libs/tool'
import Env from '@/env'
import Enums from '@/datas/Enums'
import Api from '@/libs/api'
import pinia from '@/stores/pinia'
import vuex from '@/stores/vuex'
import uviewPlus from 'uview-plus'
import 'uno.css'

export function createApp() {
	const app = createSSRApp(App)
	app.use(pinia)
	app.use(vuex)
	app.use(uviewPlus)
	app.config.globalProperties.$tool = Tool
	app.config.globalProperties.$env = Env
	app.config.globalProperties.$enums = Enums
	app.config.globalProperties.$api = Api
	return {
		app
	}
}
